package com.shujia.common_util.three;

public class StudentTest {

    // 异常的处理方法, 在方法的末尾添加  throws Exception
    public static void main(String[] args) throws Exception {
        Student student = new Student();
        student.setName("赵四");
        student.setAge(11);
        // Student 一定要重写clone, 深克隆还是浅克隆根据我们从写的方法里面逻辑
        Object obj = student.clone();
        Student cloneStu = (Student) obj;
        System.out.println(cloneStu.getName());
        System.out.println(cloneStu.getAge());
    }
}
